3.257 \(\int \frac{(a+a \sin (e+f x))^2 (A+B \sin (e+f x))}{(c+d \sin (e+f x))^3} \, dx\)

Optimal. Leaf size=215 \[ \frac{a^2 \left (3 A d^3-B \left (4 c^2 d+2 c^3+c d^2-4 d^3\right )\right ) \tan ^{-1}\left (\frac{c \tan \left (\frac{1}{2} (e+f x)\right )+d}{\sqrt{c^2-d^2}}\right )}{d^3 f (c+d)^2 \sqrt{c^2-d^2}}-\frac{a^2 \left (3 A d^2-B \left (2 c^2+3 c d-2 d^2\right )\right ) \cos (e+f x)}{2 d^2 f (c+d)^2 (c+d \sin (e+f x))}+\frac{(B c-A d) \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f (c+d) (c+d \sin (e+f x))^2}+\frac{a^2 B x}{d^3} \]

[Out]

(a^2*B*x)/d^3 + (a^2*(3*A*d^3 - B*(2*c^3 + 4*c^2*d + c*d^2 - 4*d^3))*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2
- d^2]])/(d^3*(c + d)^2*Sqrt[c^2 - d^2]*f) + ((B*c - A*d)*Cos[e + f*x]*(a^2 + a^2*Sin[e + f*x]))/(2*d*(c + d)*
f*(c + d*Sin[e + f*x])^2) - (a^2*(3*A*d^2 - B*(2*c^2 + 3*c*d - 2*d^2))*Cos[e + f*x])/(2*d^2*(c + d)^2*f*(c + d
*Sin[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.622593, antiderivative size = 215, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {2975, 2968, 3021, 2735, 2660, 618, 204} \[ \frac{a^2 \left (3 A d^3-B \left (4 c^2 d+2 c^3+c d^2-4 d^3\right )\right ) \tan ^{-1}\left (\frac{c \tan \left (\frac{1}{2} (e+f x)\right )+d}{\sqrt{c^2-d^2}}\right )}{d^3 f (c+d)^2 \sqrt{c^2-d^2}}-\frac{a^2 \left (3 A d^2-B \left (2 c^2+3 c d-2 d^2\right )\right ) \cos (e+f x)}{2 d^2 f (c+d)^2 (c+d \sin (e+f x))}+\frac{(B c-A d) \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{2 d f (c+d) (c+d \sin (e+f x))^2}+\frac{a^2 B x}{d^3} \]

Antiderivative was successfully verified.

[In]

Int[((a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x]))/(c + d*Sin[e + f*x])^3,x]

[Out]

(a^2*B*x)/d^3 + (a^2*(3*A*d^3 - B*(2*c^3 + 4*c^2*d + c*d^2 - 4*d^3))*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2
- d^2]])/(d^3*(c + d)^2*Sqrt[c^2 - d^2]*f) + ((B*c - A*d)*Cos[e + f*x]*(a^2 + a^2*Sin[e + f*x]))/(2*d*(c + d)*
f*(c + d*Sin[e + f*x])^2) - (a^2*(3*A*d^2 - B*(2*c^2 + 3*c*d - 2*d^2))*Cos[e + f*x])/(2*d^2*(c + d)^2*f*(c + d
*Sin[e + f*x]))

Rule 2975

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b^2*(B*c - A*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*(c + d*S
in[e + f*x])^(n + 1))/(d*f*(n + 1)*(b*c + a*d)), x] - Dist[b/(d*(n + 1)*(b*c + a*d)), Int[(a + b*Sin[e + f*x])
^(m - 1)*(c + d*Sin[e + f*x])^(n + 1)*Simp[a*A*d*(m - n - 2) - B*(a*c*(m - 1) + b*d*(n + 1)) - (A*b*d*(m + n +
 1) - B*(b*c*m - a*d*(n + 1)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d
, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1/2] && LtQ[n, -1] && IntegerQ[2*m] && (IntegerQ[2*n]
 || EqQ[c, 0])

Rule 2968

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x
]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]

Rule 3021

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f
_.)*(x_)]^2), x_Symbol] :> -Simp[((A*b^2 - a*b*B + a^2*C)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m +
 1)*(a^2 - b^2)), x] + Dist[1/(b*(m + 1)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(a*A - b*B + a*
C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e,
 f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(a+a \sin (e+f x))^2 (A+B \sin (e+f x))}{(c+d \sin (e+f x))^3} \, dx &=\frac{(B c-A d) \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}+\frac{\int \frac{(a+a \sin (e+f x)) (-a (B c-3 A d-2 B d)+2 a B (c+d) \sin (e+f x))}{(c+d \sin (e+f x))^2} \, dx}{2 d (c+d)}\\ &=\frac{(B c-A d) \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}+\frac{\int \frac{-a^2 (B c-3 A d-2 B d)+\left (2 a^2 B (c+d)-a^2 (B c-3 A d-2 B d)\right ) \sin (e+f x)+2 a^2 B (c+d) \sin ^2(e+f x)}{(c+d \sin (e+f x))^2} \, dx}{2 d (c+d)}\\ &=\frac{(B c-A d) \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{a^2 \left (3 A d^2-B \left (2 c^2+3 c d-2 d^2\right )\right ) \cos (e+f x)}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}-\frac{\int \frac{-a^2 (c-d) d (3 A d+B (c+4 d))-2 a^2 B (c-d) (c+d)^2 \sin (e+f x)}{c+d \sin (e+f x)} \, dx}{2 (c-d) d^2 (c+d)^2}\\ &=\frac{a^2 B x}{d^3}+\frac{(B c-A d) \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{a^2 \left (3 A d^2-B \left (2 c^2+3 c d-2 d^2\right )\right ) \cos (e+f x)}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}-\frac{\left (a^2 \left (2 B c (c+d)^2-d^2 (3 A d+B (c+4 d))\right )\right ) \int \frac{1}{c+d \sin (e+f x)} \, dx}{2 d^3 (c+d)^2}\\ &=\frac{a^2 B x}{d^3}+\frac{(B c-A d) \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{a^2 \left (3 A d^2-B \left (2 c^2+3 c d-2 d^2\right )\right ) \cos (e+f x)}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}-\frac{\left (a^2 \left (2 B c (c+d)^2-d^2 (3 A d+B (c+4 d))\right )\right ) \operatorname{Subst}\left (\int \frac{1}{c+2 d x+c x^2} \, dx,x,\tan \left (\frac{1}{2} (e+f x)\right )\right )}{d^3 (c+d)^2 f}\\ &=\frac{a^2 B x}{d^3}+\frac{(B c-A d) \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{a^2 \left (3 A d^2-B \left (2 c^2+3 c d-2 d^2\right )\right ) \cos (e+f x)}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}+\frac{\left (2 a^2 \left (2 B c (c+d)^2-d^2 (3 A d+B (c+4 d))\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (c^2-d^2\right )-x^2} \, dx,x,2 d+2 c \tan \left (\frac{1}{2} (e+f x)\right )\right )}{d^3 (c+d)^2 f}\\ &=\frac{a^2 B x}{d^3}-\frac{a^2 \left (2 B c (c+d)^2-d^2 (3 A d+B (c+4 d))\right ) \tan ^{-1}\left (\frac{d+c \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c^2-d^2}}\right )}{d^3 (c+d)^2 \sqrt{c^2-d^2} f}+\frac{(B c-A d) \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right )}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{a^2 \left (3 A d^2-B \left (2 c^2+3 c d-2 d^2\right )\right ) \cos (e+f x)}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}\\ \end{align*}

Mathematica [A]  time = 1.38937, size = 226, normalized size = 1.05 \[ \frac{a^2 (\sin (e+f x)+1)^2 \left (-\frac{2 \left (B \left (4 c^2 d+2 c^3+c d^2-4 d^3\right )-3 A d^3\right ) \tan ^{-1}\left (\frac{c \tan \left (\frac{1}{2} (e+f x)\right )+d}{\sqrt{c^2-d^2}}\right )}{(c+d)^2 \sqrt{c^2-d^2}}-\frac{d \left (A d (c+4 d)+B \left (-3 c^2-4 c d+2 d^2\right )\right ) \cos (e+f x)}{(c+d)^2 (c+d \sin (e+f x))}-\frac{d (d-c) (A d-B c) \cos (e+f x)}{(c+d) (c+d \sin (e+f x))^2}+2 B (e+f x)\right )}{2 d^3 f \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^4} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x]))/(c + d*Sin[e + f*x])^3,x]

[Out]

(a^2*(1 + Sin[e + f*x])^2*(2*B*(e + f*x) - (2*(-3*A*d^3 + B*(2*c^3 + 4*c^2*d + c*d^2 - 4*d^3))*ArcTan[(d + c*T
an[(e + f*x)/2])/Sqrt[c^2 - d^2]])/((c + d)^2*Sqrt[c^2 - d^2]) - (d*(-c + d)*(-(B*c) + A*d)*Cos[e + f*x])/((c
+ d)*(c + d*Sin[e + f*x])^2) - (d*(A*d*(c + 4*d) + B*(-3*c^2 - 4*c*d + 2*d^2))*Cos[e + f*x])/((c + d)^2*(c + d
*Sin[e + f*x]))))/(2*d^3*f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^4)

________________________________________________________________________________________

Maple [B]  time = 0.187, size = 1916, normalized size = 8.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))/(c+d*sin(f*x+e))^3,x)

[Out]

7/f*a^2/d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2*c^2/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)*B-2/f*a^2
/d^3/(c^2+2*c*d+d^2)/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))*B*c^3-4/f*a^2/d^
2/(c^2+2*c*d+d^2)/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))*B*c^2+1/f*a^2/d/(c*
tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*c^2*tan(1/2*f*x+1/2*e)^3*B-2/f*a^2*d^2/(c*tan
(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)/c*tan(1/2*f*x+1/2*e)^2*B-2/f*a^2*d^2/(c*tan(1/2*
f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)/c*tan(1/2*f*x+1/2*e)^3*A-1/f*a^2/d/(c^2+2*c*d+d^2)/(c
^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))*B*c-2/f*a^2*d^3/(c*tan(1/2*f*x+1/2*e)^2
+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2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*a^2/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)
*B*c+2/f*a^2*B/d^3*arctan(tan(1/2*f*x+1/2*e))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))/(c+d*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.76706, size = 3087, normalized size = 14.36 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))/(c+d*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

[1/4*(4*(B*a^2*c^4*d^2 + 2*B*a^2*c^3*d^3 - 2*B*a^2*c*d^5 - B*a^2*d^6)*f*x*cos(f*x + e)^2 - 4*(B*a^2*c^6 + 2*B*
a^2*c^5*d + B*a^2*c^4*d^2 - B*a^2*c^2*d^4 - 2*B*a^2*c*d^5 - B*a^2*d^6)*f*x - (2*B*a^2*c^5 + 4*B*a^2*c^4*d + 3*
B*a^2*c^3*d^2 - 3*A*a^2*c^2*d^3 + B*a^2*c*d^4 - (3*A + 4*B)*a^2*d^5 - (2*B*a^2*c^3*d^2 + 4*B*a^2*c^2*d^3 + B*a
^2*c*d^4 - (3*A + 4*B)*a^2*d^5)*cos(f*x + e)^2 + 2*(2*B*a^2*c^4*d + 4*B*a^2*c^3*d^2 + B*a^2*c^2*d^3 - (3*A + 4
*B)*a^2*c*d^4)*sin(f*x + e))*sqrt(-c^2 + d^2)*log(((2*c^2 - d^2)*cos(f*x + e)^2 - 2*c*d*sin(f*x + e) - c^2 - d
^2 + 2*(c*cos(f*x + e)*sin(f*x + e) + d*cos(f*x + e))*sqrt(-c^2 + d^2))/(d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^2)*cos(f*x + e))) - (2*
B*a^2*c^5*d + 4*B*a^2*c^4*d^2 - (4*A + 3*B)*a^2*c^3*d^3 - (A + 4*B)*a^2*c^2*d^4 + (4*A + B)*a^2*c*d^5 + A*a^2*
d^6)*cos(f*x + e) - (4*(B*a^2*c^5*d + 2*B*a^2*c^4*d^2 - 2*B*a^2*c^2*d^4 - B*a^2*c*d^5)*f*x + (3*B*a^2*c^4*d^2
- (A - 4*B)*a^2*c^3*d^3 - (4*A + 5*B)*a^2*c^2*d^4 + (A - 4*B)*a^2*c*d^5 + 2*(2*A + B)*a^2*d^6)*cos(f*x + e))*s
in(f*x + e))/((c^4*d^5 + 2*c^3*d^6 - 2*c*d^8 - d^9)*f*cos(f*x + e)^2 - 2*(c^5*d^4 + 2*c^4*d^5 - 2*c^2*d^7 - c*
d^8)*f*sin(f*x + e) - (c^6*d^3 + 2*c^5*d^4 + c^4*d^5 - c^2*d^7 - 2*c*d^8 - d^9)*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**2*(A+B*sin(f*x+e))/(c+d*sin(f*x+e))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.40316, size = 949, normalized size = 4.41 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))/(c+d*sin(f*x+e))^3,x, algorithm="giac")

[Out]

((f*x + e)*B*a^2/d^3 - (2*B*a^2*c^3 + 4*B*a^2*c^2*d + B*a^2*c*d^2 - 3*A*a^2*d^3 - 4*B*a^2*d^3)*(pi*floor(1/2*(
f*x + e)/pi + 1/2)*sgn(c) + arctan((c*tan(1/2*f*x + 1/2*e) + d)/sqrt(c^2 - d^2)))/((c^2*d^3 + 2*c*d^4 + d^5)*s
qrt(c^2 - d^2))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